/**
 * 
 */
package edu.gtcfla.km.admin.appmodules.service;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Set;

import org.hibernate.service.spi.ServiceException;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestBody;
import org.vsg.biz.BusinessOperationException;
import org.vsg.biz.account.Role;
import org.vsg.common.web.json.SelectItem;
import org.vsg.search.api.criterion.PaginationCriteria;

import edu.gtcfla.km.admin.appmodules.vo.RoleFormVO;
import edu.gtcfla.km.admin.appmodules.vo.RoleListedVO;

/**
 * face to system Role
 * @author Bill Vison
 *
 */
public interface RoleService {
	

	public Page<RoleListedVO> pageRoles(PaginationCriteria criteria) throws BusinessOperationException, org.vsg.search.api.page.PaginationException;
	

	/**
	 * 
	 * @param Role
	 * @throws ServiceException
	 */
	public void addRole(RoleFormVO Role) throws BusinessOperationException;
	
	/**
	 * add Role with the parent Role pk
	 * @param Role
	 * @param parentRolePK
	 * @throws ServiceException
	 */
	public void addRoleWithParentRole(Role Role , Serializable parentRolePK) throws BusinessOperationException;
	
	/**
	 * 
	 * @param Role
	 * @throws ServiceException
	 */
	public void deleteRole(Role Role) throws BusinessOperationException;
	
	
	/**
	 * 删除多组角色
	 * @param Roles
	 * @throws ServiceException
	 */
	public void deleteRolesDirectly(Set<RoleListedVO> Roles) throws BusinessOperationException;
	
	/**
	 * 删除用户角色
	 * @param receiveValues
	 * @throws BusinessOperationException
	 */
	public void deleteDirectlyByRoleIds(String[] receiveValues) throws BusinessOperationException;
	
	/**
	 * update domain object "Role"
	 * @param Role
	 * @throws ServiceException
	 */
	public void updateRole(RoleFormVO Role) throws BusinessOperationException ;

	/**
	 * update the Role status for the object
	 * @param Role
	 * @param parentRolePK
	 * @throws ServiceException
	 */
	public void updateRoleWithParentRole(Role Role , Serializable parentRolePK) throws BusinessOperationException;
	
	
	/**
	 * pk - primary key of domain object "Role"
	 * @param pk
	 * @return
	 * @throws ServiceException
	 */
	public RoleFormVO loadRole(Serializable pk) throws BusinessOperationException;
	
	/**
	 * 
	 * @param Role
	 * @return
	 * @throws ServiceException
	 */
	public Role findParentRoleByRole(Role Role) throws BusinessOperationException;
	
	/**
	 * 
	 * @return
	 * @throws ServiceException
	 */
	public Collection<Role> findAvailableRolesOfTreeRoot() throws BusinessOperationException;
	
	/**
	 * show Roles for selected --
	 * @return
	 * @throws ServiceException
	 */
	public Set<RoleListedVO> findAllRolesForSelected() throws BusinessOperationException;
	
	/**
	 * find all available role for select
	 * @return
	 * @throws BusinessOperationException
	 */
	public Set<SelectItem> findAvailableRoles() throws BusinessOperationException;
	
	/**
	 * find all basic system role 
	 * @return
	 * @throws BusinessOperationException
	 */
	public Set<SelectItem> findAllSystemRoles() throws BusinessOperationException;
	
	
}
